﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ADDDF.Infrastructure;

namespace ADDDF.Infrastructure.Test.Support
{
    /* These are for testing RepositoryFactory.Create from loading type from 
     * assembly. Please don't add them to repositoryMapping.
     */

    public class Fish : KeyAssignableEntityBase, IAggregateRoot
    {
        public Fish(int id)
            : base(id)
        {
        }

        public string Name { get; set; }       
    }

    public interface IFishRepository : IRepository<Fish>
    {
    }

    public class FishRepository : RepositoryBase<Fish>, IFishRepository
    {
        public override Fish FindByKey(object key)
        {
            return new Fish(23) { Name = "Nemo" };
        }

        public override IEnumerable<Fish> FindAll()
        {
            throw new NotImplementedException();
        }

        public override void Add(Fish item)
        {
            throw new NotImplementedException();
        }

        public override void Remove(Fish item)
        {
            throw new NotImplementedException();
        }

        public override void Change(Fish item)
        {
            throw new NotImplementedException();
        }
    }
}
